import time
import requests
import multiprocessing as mp

# url_list = ['http://httpbin.org/headers'] * 5
url_list = ['http://www.baidu.com'] * 5


def request_url(url):
    response = requests.get(url)
    print(response)


def run():
    p_list = []
    for url in url_list:
        p = mp.Process(target=request_url, args=(url,))
        p_list.append(p)

    for p in p_list:
        p.start()

    for p in p_list:
        p.join()


if __name__ == '__main__':
    start_time = time.time()
    run()
    print(time.time() - start_time)
